package com.winning.pmph.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Table;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "mq_failure_record")
public class MQFailureRecord {

    public static Integer KIND_PRODUCER = 0;  // 生产者推送失败;
    public static Integer KIND_CONSUMER = 1;  // 消费者消费失败;

    /** ID */
    @TableId
    private String id;
    
    /** 消息推送topic, 即平台ID */
    private String topic;
    
    /** message 对应tags, tag, knowledgeLib, knowledge, metadata, article, catalog  */
    private String tags;
    
    /** message 对应keys 名称  */
    private String keys;
    
    /** 具体消息内容 */
    private String body;
    
    /** 对应body id */
    private String bodyId;
    /** body版本号 */
    private Integer version;
    
    /** 失败原因, 发送失败: 0, 消费失败: 1 */
    private Integer kind;
    
    /** 操作时间 */
    private String operatedTime;
}
